home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
comm
/
cnet
/
edp2days.lha
/
EDPTwoDays.Rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-02-22
|
8KB
|
218 lines
/*
TwoDays.Rexx version 2.1 by Edward Peyton
Galt AKA Edward D. Peyton
Atlantis BBS: (904) 479-3133 | 479-4080
WebSite: http://www.pen.net/~atlantis
email : edp@pen.net Edward Peyton@1:3612/369.0
snailmail:
5100 N 9th Ave F-601
Pensacola, FL 32504
This program will log and SHOW ALL callers to your bbs on a given day,
ALL callers to the bbs for YESTERDAY, and, if you enable it, a GUESS as
to the callers you will have tomorrow. <G> I guess it should be called
EDPThreedays.rexx. The idea for the Tommorrow command was not mine, BTW,
I just added it at a rather insane users' suggestion. I hope that doesn't
make me insane as well. :)
Read the docs for installation, and check the settings below!
Very important!
*/
/* -----Sysop definable settings----- */
ls=0 /*0=Don't LOG sysop, 1=LOG sysop*/
log='Sysdata:edptoday.ctxt' /*Location and name of Log file for TODAY*/
log2='sysdata:edpyesterday.ctxt' /*Location and name of Log file for YESTERDAY*/
log3='sysdata:edptomorrow.ctxt' /*Location and name of log file for tommorow */
loga='sysdata:edpalltoday.ctxt' /*Logs All the excluded callers for sysop viewing! */
loga2='sysdata:edpallyest.ctxt' /* Yesterdays ALL logged callers. */
list='Organization' /* Choose Organization to list organizations string, or Access Group to list Access group name. */
lista='Access Group' /* Chosee Organization to list organizations in the log ALL callers, or Access Group to list access group. */
bbs='Atlantis' /*How you want your BBS name to read */
pt=3 /*Port to NOT log; D to disable */
group=25 /* Access group to not log */
grou=2 /* another access group to NOT log. */
/* ---------------Begin Program-------------*/
options results;ss=sendstring;tr=transmit
signal on ERROR;signal on SYNTAX;signal on IOERR
if ~exists(log) then do;call open(file,log,w);call close(file);end
if ~exists(loga) then do;call open(file,loga,w);call close(file);end
getuser 1200044;maint=result
bbsidentify sysop
sn=result
getuser 1
nm=result
getuser 23
port=result
getuser 15;grp=result
getuser 39;uucp=result
if (sn=nm & ls=0) then lg=0
if port=pt then lg=0
if grp=group then lg=0
if grp=grou then lg=0
lock='ram:twodaylock'
getuser 1100461;sex=result
If sex=0 then name="c9"nm
If sex=1 then name="cc"nm
arg dis
tm=time('C')
dt=Date('W')
if dis="TODAY" then signal TODAY
if dis="YESTERDAY" then signal YESTERDAY
if dis="TOMORROW" then signal TOMORROW
if exists(lock) then ss 'w1.w2.w1.w1.w1.'
if ~exists(lock) then do;call open(stop,lock,w);call close(stop);end
if dis="CHANGEDAY" then signal CHANGEDAY
getuser 1200016;age=result
getuser 24;baud=result/10
getuser 4;city=result
getuser 22;calls=result
getuser 16;accs=result
getuser 59;org=result
if age<18 then ega='*'
if age>17 then ega=' '
if lg=0 then ega='@'
if lista='Organization' then orga=org
if lista='Access Group' then orga=accs
if open(fi,'ram:EDPtempa',w) then do
call writeln(fi,("cf"left(ega,1)left(name,19)"c6 "left(city,15)"cb "left(orga,25)"c7"right(port,2)" c2"right(baud,3)"c3"right(tm,8)"c6 "right(calls,5)))
end
call close(fi)
address command 'join ram:EDPtempa 'loga' to Ram:Loga'
address command 'copy ram:loga 'loga''
address command 'delete ram:loga ram:EDPtempa'
if lg=0 then call LEAVE
if list='Organization' then orga=org
if list='Access Group' then orga=accs
if open(fi,'ram:EDPtemp',w) then do
call writeln(fi,("cb"left(ega,1)left(name,19)"c6 "left(city,15)"cb "left(orga,25)"c7"right(port,2)" c2"right(baud,3)"c3"right(tm,8)"c6 "right(calls,5)))
end
call close(fi)
address command 'join ram:EDPtemp 'log' to Ram:LOG'
address command 'copy ram:log 'log''
address command 'delete ram:log ram:EDPtemp'
Call LEAVE
TODAY:
getuser 1302307;extra=result
if extra="?" then do;changewhere "TodayInfo!";call HELP;end
changewhere "Today!"
tr"n1cf All c2Today's cfcallers to ce"bbs" "
tr"c4 EDPTwoDays.Rexx $VER 2.1 by Galt of Atlantisn1"
tr"c6 Type TODAY ? for more information.n1 "
if exists(lock) then do;tr 'n2caLogfile is busy, try again in a minute!n1c6';exit;end
if maint=0 then CALL TUSER
if extra= "u" then CALL TUSER
tr"c6 Handle / Node # Calling From "lista " Pt BPS LogOn Calls"
ss"c7 ---------------- --------------- ------------------------- - --- ------- -----"
if open(toda,loga,r) then do
sendfile loga
call close(toda)
end
else tr "can1Today's callers logfile is as yet empty!"
exit
TUSER:
tr"c6 Handle / Node # Calling From "list " Pt BPS LogOn Calls"
ss"c7 ---------------- --------------- ------------------------- - --- ------- -----"
if open(tod,log,r) then do
sendfile log
call close(tod)
end
else tr "can1Today's callers logfile is as yet empty!"
tr"c6"
Exit
YESTERDAY:
changewhere "Yesterday!"
tr"n1cf All c2Yesterday's cfcallers to ce"bbs" "
tr"c4 EDPTwoDays.Rexx $VER 2.1 by Galt of Atlantisn1"
if exists(lock) then do;tr 'caLogfile is busy, try again in a minute!n1c6';exit;end
if maint=0 then call YUSER
tr"c6 Handle / Node # Calling From "lista " Pt BPS LogOn Calls"
ss"c7 ---------------- --------------- ------------------------- - --- ------- -----"
if open(yesa,loga2,r) then do
sendfile loga2
call close(yesa)
end
else tr"can1Yesterday's callers logfile is empty! (Sorry!)"
exit
YUSER:
tr"c6 Handle / Node # Calling From "list " Pt BPS LogOn Calls"
ss"c7 ---------------- --------------- ------------------------- - --- ------- -----"
if open(yes,log2,r) then do
sendfile log2
call close(yes)
end
else tr"can1Yesterday's callers logfile is empty! (Sorry!)"
tr "c6"
exit
TOMORROW:
changewhere "Tomorrow!"
tr"n1cf Some of c2Tomorrow's cfcallers to ce"bbs
tr"c7 EDP3Days.Rexx $VER 1.2ax3.2.r4 by "name"c7 of "bbs"n1"
tr" cfJust a guess, really. :-)n1 "
tr"c6 Handle / Node # Calling From Organization Pt BPS LogOn Calls"
ss"c7 ---------------- --------------- ------------------------ - --- ------- -----"
if exists(lock) then do;tr 'n1caLogfile is busy, try again in a minute!n1c6';exit;end
if exists('ram:tomfile') then do
tr "can1I don't know who is going to call tomorrow, are you crazy?!? c6Try again in a minute"
exit
end
if exists(log3) then do
call open(file,log3)
block=readln(file)
call close(file)
if block=' ' then do
tr "can1I don't know who is going to call tomorrow, are you crazy?!? "
exit
end
l=RANDOM(,,TIME('S'))
l=RANDOM(85,89)
address command 'Sort 'log3 ' to ram:tomfile COLSTART 'l
sendfile 'ram:tomfile'
address command 'delete ram:tomfile'
end
else tr"can1I don't know who is going to call tomorrow, are you crazy?!?"
tr "c6"
exit
CHANGEDAY:
if ~exists(log3) then do;call open(jnk,log3,w);call close(jnk);end
if ~exists(log2) then do;call open(juk,log2,w);call close(juk);end
if ~exists(loga2) then do;call open(junk,loga2,w);call close(junk);end
address command 'delete 'log3
address command 'rename 'log2' 'log3' '
address command 'rename 'log' 'log2' '
address command 'delete 'loga2
address command 'rename 'loga' 'loga2' '
tr 'c9Today is now yesterday, and yesterday is now tomorrow!'
logentry 'EDPTwoDays.Rexx reports:New Days!'
Call LEAVE
HELP:
tr 'n1EDP2Days.rexx, Version 2.1 by Edward D. Peyton.n1'
tr 'This program logs all callers to 'bbs', as well as all TrapDoor Sessions.'
tr 'The TO: and FR: in the Network calls indicate whether it was an OUTgoing,'
tr 'or INcoming Call. Node number, node name, Baud, and time are all logged.'
tr 'The far right field indicates the number of files sent or received.n1'
tr 'The cb*c6 next to a handle indicates they are under 18.'
tr 'Males are in ccBluec6, and Females are in c9Redc6.'
tr 'The rest should be self-explanatory.n1'
exit
LEAVE:
address command 'delete 'lock' '
EXIT
SYNTAX:;ERROR:;IOERR:;address command 'delete 'lock' '
e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)'
e2=' c9Linecf: ce'left(sigl,4)'c9Filecf:';getuser 1311992;a=result
getuser 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1
logentry e2;e=sourceline(sigl);do while e~='';e3='c9Sourcecf: cd'
e3=e3||left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit